﻿<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=1.0" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>个人中心</title>
<link rel="stylesheet" type="text/css" href="css/footer.css">
<link rel="stylesheet" type="text/css" href="https://www.maksdu.com/static/font-awesome-4.7.0/css/font-awesome.min.css">
</head>

<body>
<section class="aui-flexView">
    <header class="aui-navBar aui-navBar-fixed">
        <a href="javascript:history.back(-1);" class="aui-navBar-item">
            <i class="icon icon-return" style="width:12px"></i>
        </a>
        <div class="aui-center">
            <span class="aui-center-title">个人主页</span>
        </div>
        <a href="javascript:;" class="aui-navBar-item">
            <i class="icon icon-sys"></i>
        </a>
    </header>
    <section class="aui-scrollView">
        
        <div class="aui-flex" style="padding-top: 0px;">
            <div class="head">
                <div class="head-img">
                    <img id="headerUrl" src="img/head-img.png">
                </div>
                <div class="head-dsb">
                    <p class="dsb-name" id="nickName">--凌乱</p>
                    <p class="dsb-name" id="description"></p>
                    <p class="dsb-id" id="userid">ID  1271543621</p>
                </div>
            </div>
        </div>
        <div class="divHeight"></div>
        <div class="aui-palace">
            <a href="#" class="aui-palace-grid">
                <div class="aui-palace-grid-icon">
                    <!-- <img src="images/icon-head-01.png" alt=""> -->
                    <h2 id="attention">0</h2>
                </div>
                <div class="aui-palace-grid-text">
                    <h2 id="nav_1">我的关注</h2>
                </div>
            </a>
            <a href="#" class="aui-palace-grid">
                <div class="aui-palace-grid-icon">
                    <!-- <img src="images/icon-head-02.png" alt=""> -->
                    <h2 id="fans">0</h2>
                </div>
                <div class="aui-palace-grid-text">
                    <h2 id="nav_2">我的粉丝</h2>
                </div>
            </a>
            <a href="#" class="aui-palace-grid">
                <div class="aui-palace-grid-icon">
                    <!-- <img src="images/icon-head-03.png" alt=""> -->
                    <h2 id="groups">0</h2>
                </div>
                <div class="aui-palace-grid-text">
                    <h2 id="nav_3">我的群组</h2>
                </div>
            </a>
            <a href="#" class="aui-palace-grid">
                <div class="aui-palace-grid-icon">
                    <!-- <img src="images/icon-head-04.png" alt=""> -->
                    <h2 id="collect">0</h2>
                </div>
                <div class="aui-palace-grid-text">
                    <h2 id="nav_4">我的收藏</h2>
                </div>
            </a>
        </div>
        <div class="divHeight"></div>
        <div class="aui-flex b-line">
            <div class="aui-flex-box">
                <h2>个人设置</h2>
            </div>
        </div>
        <section class="mt-1"> 
            <div class="ps-lt">
                <a href="info.html"><div class="lt-dsb">
                    <p><i class="fa fa-user-o fa-fw"></i>&nbsp;个人信息</p>
                    <i class="arr-right"></i>
                </div></a>
                <a href="https://www.maksdu.com/chat/chat.html"><div class="lt-dsb">
                    <p><i class="fa fa-address-book fa-fw"></i>&nbsp;我的好友</p>
                    <i class="arr-right"></i>
                </div></a>
                <a href="phoneNumber.html"><div class="lt-dsb">
                    <p><i class="fa fa-phone fa-fw"></i>&nbsp;手机绑定</p>
                    <i class="arr-right"></i>
                </div></a>
                <a href="email.html"><div class="lt-dsb">
                    <p><i class="fa fa-envelope-o fa-fw"></i>&nbsp;邮箱绑定</p>
                    <i class="arr-right"></i>
                </div></a>
                <a href=""><div class="lt-dsb cl-bb">
                    <p><i class="fa fa-key fa-fw"></i>&nbsp;修改密码</p>
                    <i class="arr-right"></i>
                </div></a>
            </div>
        </section>
        <div class="divHeight"></div>
        <div class="aui-flex b-line">
            <div class="aui-flex-box">
                <h2>其他活动</h2>
            </div>
        </div>
        <section class="mt-1"> 
            <div class="ps-lt">
                <div class="lt-dsb">
                    <p><i class="fa fa-heart fa-fw"></i>&nbsp;猜你喜欢</p>
                    <i class="arr-right"></i>
                </div>
            </div>
            <div class="ps-lt">
                <div class="lt-dsb">
                    <p><i class="fa fa-tree fa-fw"></i>&nbsp;附近的人</p>
                    <i class="arr-right"></i>
                </div>
            </div>
            <div class="ps-lt">
                <div class="lt-dsb cl-bb">
                    <p><i class="fa fa-wrench fa-fw"></i>&nbsp;设置</p>
                    <i class="arr-right"></i>
                </div>
            </div>
        </section>
        <div class="divHeight"></div>
        <div class="aui-flex b-line">
            <div class="aui-flex-box">
                <h2>服务中心</h2>
            </div>
        </div>
        <section class="mt-1"> 
            <div class="ps-lt">
                <div class="lt-dsb">
                    <p><i class="fa fa-user-o fa-fw"></i>&nbsp;会员中心</p>
                    <i class="arr-right"></i>
                </div>
            </div>
            <div class="ps-lt">
                <div class="lt-dsb">
                    <p><i class="fa fa-users fa-fw"></i>&nbsp;我的群组</p>
                    <i class="arr-right"></i>
                </div>
            </div>
            <div class="ps-lt">
                <div class="lt-dsb cl-bb">
                    <p><i class="fa fa-history fa-fw"></i>&nbsp;浏览历史</p>
                    <i class="arr-right"></i>
                </div>
            </div>
        </section>
        <div class="jg"></div>

    </section>

    
    
    <footer class="aui-footer aui-footer-fixed">
        <a href="../../home/" class="aui-tabBar-item aui-tabBar-item-active">
            <span class="aui-tabBar-item-icon">
                <i class="icon icon-loan"></i>
            </span>
            <span class="aui-tabBar-item-text">首页</span>
        </a>
        <a href="../../school/" class="aui-tabBar-item ">
            <span class="aui-tabBar-item-icon">
                <i class="icon icon-ions"></i>
            </span>
            <span class="aui-tabBar-item-text">校园</span>
        </a>
        <a href="javascript:;" class="aui-tabBar-item ">
            <span class="aui-tabBar-item-icon">
                <i class="icon icon-credit"></i>
            </span>
            <span class="aui-tabBar-item-text">特殊</span>
        </a>

        <a href="javascript:;" class="aui-tabBar-item ">
            <span class="aui-tabBar-item-icon">
                <i class="icon icon-meTo"></i>
            </span>
            <span class="aui-tabBar-item-text">我的</span>
        </a>
    </footer>
    
</section>
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script>
    (function (doc, win) {
     var docEl = doc.documentElement,
     resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
     recalc = function () {
       var clientWidth = docEl.clientWidth;
       if (!clientWidth) return;
       docEl.style.fontSize = 100 * (clientWidth / 750) + 'px';
     };

      if (!doc.addEventListener) return;
      win.addEventListener(resizeEvt, recalc, false);
      doc.addEventListener('DOMContentLoaded', recalc, false);
    })(document, window);

  
    // $("#headerUrl").on("click",function(){
    //     console.info("upload");
    //     $("#avatorUpload").click();
    // });

    // $("#avatorUpload").change(function(e){
    //     console.info(e);
    // })
    

    $(function(){
        window.localStorage.setItem('myinfoUpdate',false);
        var token = window.localStorage.getItem('token');
        if(token) {
            $.ajax({
                url: 'https://www.maksdu.com/app/user',
                method: 'get',
                headers: {
                    'request_access_token': token
                },
                success: function(data) {
                    console.info(data);
                    if(data.code == 200) {
                        var user = data.result.value.user;
                        if(user) {
                            var userinfo = user.userinfo;
                            if(userinfo) {
                                window.localStorage.setItem('myinfo',JSON.stringify(userinfo));
                                var headerUrl = userinfo.headpic;
                                var nickName = userinfo.nickName;
                                var description = userinfo.description;
                                var id = data.result.value.user.id;
                                window.localStorage.setItem('myid',id);
                                $("#headerUrl").attr("src",headerUrl);
                                $("#nickName").html("--&nbsp;"+nickName);
                                $("#userid").html("ID:  "+(10000000+id));
                                $("#description").html(description);
                            }
                        } else {
                            window.location.replace("https://www.maksdu.com/login/");
                        }
                        var userCount = data.result.value.userCount;
                        console.info(userCount);
                        $.each(userCount,function(index,value) {
                            $("#"+index).html(value);
                        });
                    }
                }
            })        
        } else {
            window.location.replace("https://www.maksdu.com/login/");
        }
    })

</script>
<script type="text/javascript">
	$('.check-on').click(function(){
		$(this).toggleClass('check-off');
		})
</script>
</body>
</html>
